//: C02:GetWords.cpp
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 1999
// Copyright notice in Copyright.txt
// Break a file into whitespace-separated words
#include <string>
#include <iostream>
#include <fstream>
#include <vector>
using namespace std;

int main()
{
    vector<string> words;
    ifstream in("GetWords.cpp");
    string word;
    while (in >> word)
        words.push_back(word);
    for (int i = 0; i < words.size(); i++)
        cout << words[i] << endl;
} ///:~
